document.domain = 'iefgames.com';		//重要

var Iefgames_CS;
(function() {
	if ($defined(Iefgames_CS)) {
		return ;
	}
	
	Iefgames_CS = {
		Core: {
			baseUri : 'http://server.cs.' + document.domain
		},
		
		Cookie: {
			Options: {},
			uuidCookieName: 'usUuid',
			csUuidCookieName: 'csUuid'
		},
		
		Cs: {
			isCser: false
		},
		
		Shout: function() {
			var map = new Hash();
			var reg = function(name, fn) {
				map.set(name, fn);
			}
			
			var get = function(name) {
				return map.get(name);
			}
			
			var call4Server = function(responseText, arg1) {
				if ($type(responseText) == 'string'
					&& arg1 != null) {
					return call(responseText, arg1);
				} else if ($type(responseText) == 'string'){
					return call(responseText, arg1);
				} else if ($type(responseText) == 'array') {
					var keys = new Hash(responseText).getKeys();
					
					for (var i=0; i<keys.length; ++i) {
						call(keys[i], responseText[keys[i]]);
					}
				}
				
			}
			
			var call = function(name, para) {
				var fn = map.get(name);
				if (!$defined(fn) || $type(fn) != 'function') {
					return ;
				}
				
				return fn(para);
			}
			
			return {
				'reg': reg,
				'call': call4Server
			}
		}()
	}
	
	Iefgames_CS._ = Iefgames_CS.Shout.call;
	Iefgames_CS._$ = Iefgames_CS.Shout.reg;
})()
